#ifndef __BACKGROUND_H__
#define __BACKGROUND_H__

#include "cocos2d.h"

#define kFPS 60

#define kNumClouds			12

#define kMinPlatformStep	50
#define kMaxPlatformStep	300
#define kNumPlatforms		10
#define kPlatformTopPadding 10

#define kMinBonusStep		30
#define kMaxBonusStep		50

enum {
	kSpriteManager = 0,
	kBird,
	kScoreLabel,
	kCloudsStartTag = 100,
	kPlatformsStartTag = 200,
	kBonusStartTag = 300
};

enum {
	kBonus5 = 0,
	kBonus10,
	kBonus50,
	kBonus100,
	kNumBonuses
};

class Background : public cocos2d::CCLayer
{
public:
	Background();
	~Background();

	// Here's a difference. Method 'init' in cocos2d-x returns bool, 
    // instead of returning 'id' in cocos2d-iphone
	virtual bool init();  

	// there's no 'id' in cpp, so we recommand to return the exactly class pointer
	//static cocos2d::CCScene* scene();

	// a selector callback
	void menuCloseCallback(cocos2d::CCObject* pSender);

	// Here's a difference. Method 'init' in cocos2d-x returns bool, 
    // instead of returning 'id' in cocos2d-iphone
	void resetClouds();  

	void resetCloud();

	void initClouds();  

	void initCloud();

	void step(float dt);
	
    // implement the "static node()" method manually
	CREATE_FUNC(Background);
    
    
protected:
	int currentCloudTag;


};

#endif  // __HELLOWORLD_SCENE_H__